using System;
using System.Data.Linq.Mapping;
using System.Runtime.Serialization;
using CoreLibrary;
using CoreLibrary.Date;
using Entities.Enumeration;

namespace Entities.DataBase.Persistent {

    [DataContract]
    [Table(Name="D_COST")]
    public class Cost {
        
        public Cost() {
            Id          = GuidUtil.GuidN();
            DateCreated = DateTime.UtcNow;
            DateUpdated = DateUtil.Epoch;
            Status      = CostStatus.NotProcessed;
        }

        [DataMember]
        [Column(Name="ID", IsPrimaryKey = true)]
        public string Id { get; set; }

        [DataMember]
        [Column(Name = "USER_ID")]
        public string UserId { get; set; }

        [DataMember]
        [Column(Name = "TYPE")]
        public int Type { get; set; }

        [DataMember]
        [Column(Name = "STATUS")]
        public int Status { get; set; }

        [DataMember]
        [Column(Name = "DESCRIPTION")]
        public string Description { get; set; }

        [DataMember]
        [Column(Name = "AMOUNT")]
        public decimal Amount { get; set; }

        [DataMember]
        [Column(Name = "CURRENCY")]
        public string Currency { get; set; }

        [DataMember]
        [Column(Name = "DATE_CREATED")]
        public DateTime DateCreated { get; set; }

        [DataMember]
        [Column(Name = "DATE_UPDATED")]
        public DateTime DateUpdated { get; set; }

    }

}